package com.zz.Service;

import com.zz.entity.Commodity;
import com.zz.repository.CommodityRepository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * @Description: java类作用描述
 * @Author: ll
 * @CreateDate: 2019/6/7$14:39$
 */

@Service
@Transactional
public class CommodityService {
    @Resource
    CommodityRepository commodityRepository;

//增
   public Commodity saveCommodity(Commodity commodity){
       Commodity commodity1=commodityRepository.save(commodity);
       return commodity;
   }


}
